console.log(globalThis);
globalThis.PromiseRejection = (err) => {
    console.log("全局错误", err);
}

for (const key in globalThis) {
    console.log(key);

}
os.setTimeout(() => {
    // throw new Error("err");
}, 1000);
new Promise((resolve, reject) => {
    reject("err3")

})
new Promise((resolve, reject) => {
    reject("err4")

})
new Promise((resolve, reject) => {
    reject("err5")

})
new Promise((resolve, reject) => {
    reject("err6")
})

os.setTimeout(() => {
    os.setTimeout(() => {
        console.log("Hello World3");
    }, 3000);

    console.log("Hello World");
}, 3000);


new Promise((resolve, reject) => {
    reject("err3")

    resolve("Hello World");

    console.log("promise");
})

 console.log("Hello World2");